<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:ui="http://java.sun.com/jsf/facelets">

  <head>
    <title>J Blogger</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script src="js/modernizr.js"/>
    <script src="js/jquery.js"></script>
    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
  </head>
  <body>
    <header>
      <h1 style="width: 50%">j-Blogger </h1>
      <section id="searcher">
        <h:form>
          <div id="tagslist">
            <h:inputText id="tags" value="#{searchBeanController.postQ}" class="input"/> 
            <h:commandLink class="Jbutton" value="search" actionListener="#{searchBeanController.buscarPosts()}"/>
          </div>


        </h:form>
      </section>
      <div id="logoutButton">
        <h:form>
          <h:commandLink  action="index?faces-redirect=true" value="J-Wall" class="Jbutton"/>
          <h:commandLink  action="#{loginController.userLogout()}" value="Log-out" class="Jbutton"/>
          
        </h:form>
      </div>
    </header>
    <section style="text-align: center"> 
      <div id="usermenu">
        <h2>Welcome,</h2> <h1 style="font-size: 2em; ">#{loginController.jmbUser.userJnick}</h1>
      </div>
      <div id="timeline">
        <h:form>

          <div class="post_item">
            <p>Query resulst..</p>
          </div>
          <ui:repeat value="#{searchBeanController.buscarPosts()}" var="row">
            <div class="post_item">
              <h:commandLink action="#" class="user_name">#{row.postUserJnick}:</h:commandLink>
              <article style="margin-left: 6em"> <p>#{row.postDescription}</p></article>
              <div class="post_item_toolbar">
                <div class="post_item_button">
                  <h:commandLink value="(#{row.postBeans})+Bean"  actionListener="#{userWallController.moreBean(row.postId)}" />
                </div>
                <div class="post_item_button">
                  <h:commandLink value="Reply" />
                </div>


              </div>
              
            </div>
          </ui:repeat>
        </h:form>

      </div>
      <div id="chat">
        chat
      </div>
    </section>

  </body>
</html>
